home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
fldpak
/
fpdemo2e.frm
< prev
next >
Wrap
Text File
|
1993-11-08
|
20KB
|
724 lines
VERSION 2.00
Begin Form EditFrm
BorderStyle = 1 'Fixed Single
Caption = "Multi-Sortable Address Book (FieldPack demo program 2)"
ClientHeight = 2895
ClientLeft = 1380
ClientTop = 2850
ClientWidth = 7215
ClipControls = 0 'False
Height = 3585
Icon = FPDEMO2E.FRX:0000
Left = 1320
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2895
ScaleWidth = 7215
Top = 2220
Width = 7335
Begin TextBox txtFindString
Height = 315
Left = 1320
TabIndex = 23
Top = 2460
Width = 1155
End
Begin ListBox lstSortingListBox
Height = 225
Left = 0
Sorted = -1 'True
TabIndex = 22
Top = 0
Visible = 0 'False
Width = 1545
End
Begin CommandButton cmdSort
Caption = "Sort by..."
Height = 315
Left = 5880
TabIndex = 21
Top = 300
Width = 1215
End
Begin CommandButton cmdNew
Caption = "New"
Height = 315
Left = 5880
TabIndex = 20
Top = 1080
Width = 1215
End
Begin CommandButton cmdFind
Caption = "<-- Find (in current sort field)"
Height = 315
Left = 2610
TabIndex = 19
Top = 2460
Width = 2805
End
Begin CommandButton cmdReport
Caption = "Report"
Height = 315
Left = 5880
TabIndex = 18
Top = 2460
Width = 1215
End
Begin VScrollBar vscrScroller
Height = 1755
Left = 5520
Min = 1
TabIndex = 7
Top = 600
Value = 1
Width = 255
End
Begin CommandButton cmdDelete
Caption = "Delete"
Height = 315
Left = 5880
TabIndex = 8
Top = 1500
Width = 1215
End
Begin TextBox txtPhone
Height = 315
Left = 3000
TabIndex = 6
Top = 2040
Width = 2415
End
Begin TextBox txtAreaCode
Height = 315
Left = 1320
TabIndex = 5
Top = 2040
Width = 855
End
Begin TextBox txtZip
Height = 315
Left = 4080
TabIndex = 4
Top = 1680
Width = 1335
End
Begin TextBox txtState
Height = 315
Left = 1320
TabIndex = 3
Top = 1680
Width = 855
End
Begin TextBox txtCity
Height = 315
Left = 1320
TabIndex = 2
Top = 1320
Width = 4095
End
Begin TextBox txtAddress
Height = 315
Left = 1320
TabIndex = 1
Top = 960
Width = 4095
End
Begin TextBox txtName
Height = 315
Left = 1320
TabIndex = 0
Top = 600
Width = 4095
End
Begin Label lblCurrentSortField
FontBold = -1 'True
FontItalic = -1 'True
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 4440
TabIndex = 25
Top = 300
Width = 1215
End
Begin Label Label9
Alignment = 1 'Right Justify
Caption = "...in sort sequence by:"
Height = 225
Left = 2400
TabIndex = 24
Top = 300
Width = 1995
End
Begin Label lblRecordID
Caption = " 0 of 0"
Height = 195
Left = 1380
TabIndex = 17
Top = 300
Width = 975
End
Begin Label Label8
Alignment = 1 'Right Justify
Caption = "Record:"
Height = 195
Left = 60
TabIndex = 16
Top = 300
Width = 1215
End
Begin Label Label7
Alignment = 1 'Right Justify
Caption = "Phone:"
Height = 195
Left = 2220
TabIndex = 15
Top = 2100
Width = 735
End
Begin Label Label6
Alignment = 1 'Right Justify
Caption = "Area Code:"
Height = 195
Left = 60
TabIndex = 14
Top = 2100
Width = 1215
End
Begin Label Label5
Alignment = 1 'Right Justify
Caption = "Zip:"
Height = 195
Left = 3420
TabIndex = 13
Top = 1740
Width = 615
End
Begin Label Label4
Alignment = 1 'Right Justify
Caption = "State:"
Height = 195
Left = 60
TabIndex = 12
Top = 1740
Width = 1215
End
Begin Label Label3
Alignment = 1 'Right Justify
Caption = "City:"
Height = 195
Left = 60
TabIndex = 11
Top = 1380
Width = 1215
End
Begin Label Label2
Alignment = 1 'Right Justify
Caption = "Address:"
Height = 195
Left = 60
TabIndex = 10
Top = 1020
Width = 1215
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "Name:"
Height = 195
Left = 60
TabIndex = 9
Top = 660
Width = 1215
End
Begin Menu mnuFile
Caption = "&File"
Begin Menu mnuExit
Caption = "E&xit"
End
End
Begin Menu mnuHelp
Caption = "&Help"
Begin Menu mnuAbout
Caption = "&About"
End
End
End
Option Explicit
'FieldPack Demo Program 2
'
'November 1993
'
'Software Source
'Fremont, California
'tel +1(510)623-7854
'fax +1(510)651-6039
'
'Original programming, including all the
'really clever report-generation work,
'by Don Wanless
'
'Rewrite and debugging, including the
'tricky New/Delete/Change stuff, and
'pedantic commentary and variable
'renaming, by Sam Cohen
Sub AdjustScrollerRange ()
Dim i As Integer
ScrollerChangeEnabled = False
vscrScroller.Max = NumberOfRecords
i% = NumberOfRecords / 10
If i% < 1 Then i% = 1
vscrScroller.LargeChange = i%
ScrollerChangeEnabled = True
End Sub
Function BuildRecord () As String
Dim rec As String
Dim wname As String
Dim firstn As String
Dim lastn As String
Dim n As Integer
wname$ = txtName.Text
n% = DS_CountDlms(wname$, ",")
If n% = 0 Then